home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
X User Tools
/
X User Tools (O'Reilly and Associates)(1994).ISO
/
sun4c
/
archive
/
tcltk.z
/
tcltk
/
man
/
cat3
/
GetJustify.3
< prev
next >
Wrap
Text File
|
1994-09-20
|
3KB
|
133 lines
Tk_GetJustify(3) Tk Library Procedures
_________________________________________________________________
NAME
Tk_GetJustify, Tk_NameOfJustify - translate between strings
and justification styles
SYNOPSIS
#include <tk.h>
Tk_Justify
Tk_GetJustify(_i_n_t_e_r_p, _s_t_r_i_n_g, _j_u_s_t_i_f_y_P_t_r)
char *
Tk_NameOfJustify(_j_u_s_t_i_f_y)
ARGUMENTS
Tcl_Interp *_i_n_t_e_r_p (in) Interpreter to use for
error reporting.
char *_s_t_r_i_n_g (in) String containing name
of justification style
(``left'', ``right'',
``center'', or
``fill'').
int *_j_u_s_t_i_f_y_P_t_r (out) Pointer to location in
which to store justify
value corresponding to
_s_t_r_i_n_g.
Tk_Justify _j_u_s_t_i_f_y (in) Justification style
(one of the values
listed below).
_________________________________________________________________
DESCRIPTION
Tk_GetJustify places in *_j_u_s_t_i_f_y_P_t_r the justify value
corresponding to _s_t_r_i_n_g. This value will be one of the fol-
lowing:
TK_JUSTIFY_LEFT
Means that the text on each line should start at the
left edge of the line; as a result, the right edges of
lines may be ragged.
TK_JUSTIFY_RIGHT
Means that the text on each line should end at the
right edge of the line; as a result, the left edges of
lines may be ragged.
TK_JUSTIFY_CENTER
Tk 1
Tk_GetJustify(3) Tk Library Procedures
Means that the text on each line should be centered;
as a result, both the left and right edges of lines may
be ragged.
TK_JUSTIFY_FILL
Means that the text on each line should start at the
left edge of the line and end at the right edge, with
the sizes of the spaces in the line adjusted to make
this work.
Under normal circumstances the return value is TCL_OK and
_i_n_t_e_r_p is unused. If _s_t_r_i_n_g doesn't contain a valid justif-
ication style or an abbreviation of one of these names, then
an error message is stored in _i_n_t_e_r_p->_r_e_s_u_l_t, TCL_ERROR is
returned, and *_j_u_s_t_i_f_y_P_t_r is unmodified.
Tk_NameOfJustify is the logical inverse of Tk_GetJustify.
Given a justify value it returns a statically-allocated
string corresponding to _j_u_s_t_i_f_y. If _j_u_s_t_i_f_y isn't a legal
justify value, then ``unknown justification style'' is
returned.
KEYWORDS
center, fill, justification, string
Tk 2